package com.iflytek.read;

import android.os.Binder;
import android.os.Messenger;

import java.util.List;
import java.util.Map;

/**
 * @author wangshuai
 */
public class MusicPlayerBinder extends Binder {

    private final MusicPlayerService service;

    public MusicPlayerBinder(MusicPlayerService service) {
        this.service = service;
    }

    public MusicPlayerService getService() {
        return service;
    }

    public Map<String, Integer> getRawMp3Files() {
        return service.getRawMp3Files();
    }

    public void playRawMp3(int resId) {
        service.playRawMp3(resId);
    }

    public List<String> getAssetsMp3Files() {
        return service.getAssetsMp3Files();
    }

    public void playAssetsMp3(String fileName) {
        service.playAssetsMp3(fileName);
    }

    public void setActivityMessenger(Messenger messenger) {
        service.activityMessenger = messenger;
    }
}